import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Predetermine from '../views/predetermine.vue'
import MENU from '../views/menu.vue'
import FoodDetail from '../views/foodDetail.vue'
import Booking from '../views/booking.vue'
import DualInfo from '../views/dualInfo.vue'
import Loading from '../views/loading.vue'
import MenuPrice from '../views/menuPrice.vue'
import PersonCenter from '../views/personCenter.vue'
import Order from '../views/order.vue'



Vue.use(VueRouter)
// index: 
const routes = [
  {
    path: '/',
    name: 'Loading',
    component: Loading,
    meta: {
      index: -999
    }
  },
  {
    path: '/index',
    name: 'Index',
    component: Index,
    meta: {
      index: 3
    }
  },
  {
    path: '/Login',
    name: 'Login',
    component: Login
  },
  {
    path: '/Register',
    name: 'Register',
    component: Register
  },
  {
    path: '/predetermine',
    name: 'Predetermine',
    component: Predetermine
  },
  {
    path: '/order',
    name: 'Order',
    component: Order
  },
  {
    path: '/menu',
    name: 'MENU',
    component: MENU,
    meta: {
      index: 1
    }
  },
  {
    path: '/FoodDetail',
    name: 'FoodDetail',
    component: FoodDetail,
    meta: {
      index: 4
    }
  },
  {
    path: '/booking',
    name: 'Booking',
    component: Booking
  },
  {
    path: '/personCenter',
    name: 'PersonCenter',
    component: PersonCenter
  },
  {
    path: '/dualInfo',
    name: 'DualInfo',
    component: DualInfo,
    meta: {
      index: 2
    }
  },
  {
    path: '/menuPrice',
    name: 'MenuPrice',
    component: MenuPrice,
    meta: {
      index: 0
    }
  },
  
]

const router = new VueRouter({
  routes
})

export default router
